package com.jemframework.domain;

import java.util.HashMap;
import java.util.Map;

import com.jemframework.Initializable;

public abstract class AbstractIdentifierGeneratorFactory implements IdentifierGeneratorFactory, Initializable {

  private final Map<Integer, IdentifierGenerator> mapping = new HashMap<Integer, IdentifierGenerator>();

  public AbstractIdentifierGeneratorFactory() {
    super();
  }

  public abstract void initialize();

  protected Map<Integer, IdentifierGenerator> getMapping() {
    return mapping;
  }

  public IdentifierGenerator getGenerator(int anEntityType) {
    return mapping.get(anEntityType);
  }
}
